<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    {{ msg }}
  </div>
</body>
<script src="lib/vue.js"></script>
<script>
  var Mixin = {
    data: {
      msg: 'aaaa'
    },
    methods: {
      getData () {
        return this.msg
      }
    }
  }
  new Vue({
    el: '#app',
    // 局部混入
    mixins: [Mixin],
    data: {
      msg: 'bbbb'
    },
    // methods: {
    //   getData () {
    //     return this.msg
    //   }
    // }
    
  })
</script>
</html>